package com.yy.enums;


/**
 * 文件储存目录
 * @author yy
 */
public enum FileBusinessTypeEnum {
	
	
	Banner("Banner", "轮播图"),
	NewsImg("News", "新闻图"),
	Others("Others", "未分类");
	
	// 成员变量
	private String desc;
	private String code;
	

	// 构造方法
	private FileBusinessTypeEnum(String code, String desc) {
		this.desc = desc;
		this.code = code;
	}

	// 普通方法
	public static String getDesc(String code) {
		for (FileBusinessTypeEnum c : FileBusinessTypeEnum.values()) {
			if (c.getCode().equalsIgnoreCase(code)) {
				return c.desc;
			}
		}
		return null;
	}
	
	public String getDesc() {
		return desc;
	}
	
	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}


}
